Os start event detection, os fingerprinting, and device tracking using enhanced data features

ABSTRACT

In one embodiment, a device in a network tracks changes in a source port or address identifier indicated by network traffic associated with a particular host in the network. The device detects an operating system start event based on the track changes in the source port or address identifier indicated in the traffic data associated with the particular host. The device provides data regarding the detected operating system start event as input to a machine learning-based malware detector. The device causes performance of a mitigation action in the network when the malware detector determines that the particular host is infected with malware.

RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.15/648,626, filed on Jul. 13, 2017, entitled OS START DETECTION, OSFINGERPRINTING, AND DEVICE TRACKING USING ENHANCED DATA FEATURES, byDavid McGrew, et al., the contents of which are incorporated byreference herein.

TECHNICAL FIELD

The present disclosure relates generally to computer networks, and, moreparticularly, to operating system (OS) start event detection, OSfingerprinting, and device tracking using enhanced data features.

BACKGROUND

In general, behavioral analytics is a branch of network administrationthat seeks to gain insight into the operation of the network byassessing the behaviors of the devices in the network. This insight canthen be used for a variety of different purposes such as making loadbalancing decisions, security assessments, access control, to ensurethat traffic quality of service (QoS) levels are met, and the like. Forexample, in the context of network security, a host device infected withmalware may exhibit behavioral changes when compared to non-infectedhosts, thereby facilitating detection of even previously unknown typesof malware.

While behavioral analytics can be quite powerful in certain situations,capturing and reporting information about the monitored devices for useby a behavioral analytics system is itself a distinct branch of study.In particular, much like Heisenberg's Uncertainty Principle, the verynature of observing device behavior in the network can have an effect onthe behavior of the devices and of the network as a whole. Typically,the more information gathered and collected about the behavior of adevice, the more the behavior of the device and the network at large maychange. For example, executing a monitoring agent on a host device tocapture information about the behavior of the device will consumeavailable resources of the host. Further, reporting large amounts ofcollected data regarding the behavior of a host will consume networkbandwidth and other resources, which could impinge on user traffic inthe network.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments herein may be better understood by referring to thefollowing description in conjunction with the accompanying drawings inwhich like reference numerals indicate identically or functionallysimilar elements, of which:

FIGS. 1A-1B illustrate an example communication network;

FIG. 2 illustrates an example network device/node;

FIG. 3 illustrates an example of a device capturing traffic information;

FIG. 4 illustrates an example of the tracking of host network traffic;

FIGS. 5A-5B illustrate examples of the detection of operating systemstart events from tracked network traffic;

FIGS. 6A-6B illustrate examples of operating system fingerprinting fromtracked network traffic; and

FIG. 7 illustrates an example simplified procedure for detectingoperating system restarts in a network.

DESCRIPTION OF EXAMPLE EMBODIMENTS Overview

According to one or more embodiments of the disclosure, a device in anetwork tracks changes in a source port or address identifier indicatedby network traffic associated with a particular host in the network. Thedevice detects an operating system start event based on the trackchanges in the source port or address identifier indicated in thetraffic data associated with the particular host. The device providesdata regarding the detected operating system start event as input to amachine learning-based malware detector. The device causes performanceof a mitigation action in the network when the malware detectordetermines that the particular host is infected with malware.

Description

A computer network is a geographically distributed collection of nodesinterconnected by communication links and segments for transporting databetween end nodes, such as personal computers and workstations, or otherdevices, such as sensors, etc. Many types of networks are available,with the types ranging from local area networks (LANs) to wide areanetworks (WANs). LANs typically connect the nodes over dedicated privatecommunications links located in the same general physical location, suchas a building or campus. WANs, on the other hand, typically connectgeographically dispersed nodes over long-distance communications links,such as common carrier telephone lines, optical lightpaths, synchronousoptical networks (SONET), or synchronous digital hierarchy (SDH) links,or Powerline Communications (PLC) such as IEEE 61334, IEEE P1901.2, andothers. The Internet is an example of a WAN that connects disparatenetworks throughout the world, providing global communication betweennodes on various networks. The nodes typically communicate over thenetwork by exchanging discrete frames or packets of data according topredefined protocols, such as the Transmission Control Protocol/InternetProtocol (TCP/IP). In this context, a protocol consists of a set ofrules defining how the nodes interact with each other. Computer networksmay further be interconnected by an intermediate network node, such as arouter, to extend the effective “size” of each network.

Smart object networks, such as sensor networks, in particular, are aspecific type of network having spatially distributed autonomous devicessuch as sensors, actuators, etc., that cooperatively monitor physical orenvironmental conditions at different locations, such as, e.g.,energy/power consumption, resource consumption (e.g., water/gas/etc. foradvanced metering infrastructure or “AMI” applications) temperature,pressure, vibration, sound, radiation, motion, pollutants, etc. Othertypes of smart objects include actuators, e.g., responsible for turningon/off an engine or perform any other actions. Sensor networks, a typeof smart object network, are typically shared-media networks, such aswireless networks. That is, in addition to one or more sensors, eachsensor device (node) in a sensor network may generally be equipped witha radio transceiver or other communication port, a microcontroller, andan energy source, such as a battery. Often, smart object networks areconsidered field area networks (FANs), neighborhood area networks(NANs), personal area networks (PANs), etc. Generally, size and costconstraints on smart object nodes (e.g., sensors) result incorresponding constraints on resources such as energy, memory,computational speed and bandwidth.

FIG. 1A is a schematic block diagram of an example computer network 100illustratively comprising nodes/devices, such as a plurality ofrouters/devices interconnected by links or networks, as shown. Forexample, customer edge (CE) routers 110 may be interconnected withprovider edge (PE) routers 120 (e.g., PE-1, PE-2, and PE-3) in order tocommunicate across a core network, such as an illustrative networkbackbone 130. For example, routers 110, 120 may be interconnected by thepublic Internet, a multiprotocol label switching (MPLS) virtual privatenetwork (VPN), or the like. Data packets 140 (e.g., traffic/messages)may be exchanged among the nodes/devices of the computer network 100over links using predefined network communication protocols such as theTransmission Control Protocol/Internet Protocol (TCP/IP), User DatagramProtocol (UDP), Asynchronous Transfer Mode (ATM) protocol, Frame Relayprotocol, or any other suitable protocol. Those skilled in the art willunderstand that any number of nodes, devices, links, etc. may be used inthe computer network, and that the view shown herein is for simplicity.

In some implementations, a router or a set of routers may be connectedto a private network (e.g., dedicated leased lines, an optical network,etc.) or a virtual private network (VPN), such as an MPLS VPN, thanks toa carrier network, via one or more links exhibiting very differentnetwork and service level agreement characteristics. For the sake ofillustration, a given customer site may fall under any of the followingcategories:

1.) Site Type A: a site connected to the network (e.g., via a private orVPN link) using a single CE router and a single link, with potentially abackup link (e.g., a 3G/4G/LTE backup connection). For example, aparticular CE router 110 shown in network 100 may support a givencustomer site, potentially also with a backup link, such as a wirelessconnection.

2.) Site Type B: a site connected to the network using two MPLS VPNlinks (e.g., from different service providers), with potentially abackup link (e.g., a 3G/4G/LTE connection). A site of type B may itselfbe of different types:

2a.) Site Type B1: a site connected to the network using two MPLS VPNlinks (e.g., from different service providers), with potentially abackup link (e.g., a 3G/4G/LTE connection).

2b.) Site Type B2: a site connected to the network using one MPLS VPNlink and one link connected to the public Internet, with potentially abackup link (e.g., a 3G/4G/LTE connection). For example, a particularcustomer site may be connected to network 100 via PE-3 and via aseparate Internet connection, potentially also with a wireless backuplink.

2c.) Site Type B3: a site connected to the network using two linksconnected to the public Internet, with potentially a backup link (e.g.,a 3G/4G/LTE connection).

Notably, MPLS VPN links are usually tied to a committed service levelagreement, whereas Internet links may either have no service levelagreement at all or a loose service level agreement (e.g., a “GoldPackage” Internet service connection that guarantees a certain level ofperformance to a customer site).

3.) Site Type C: a site of type B (e.g., types B1, B2 or B3) but withmore than one CE router (e.g., a first CE router connected to one linkwhile a second CE router is connected to the other link), andpotentially a backup link (e.g., a wireless 3G/4G/LTE backup link). Forexample, a particular customer site may include a first CE router 110connected to PE-2 and a second CE router 110 connected to PE-3.

FIG. 1B illustrates an example of network 100 in greater detail,according to various embodiments. As shown, network backbone 130 mayprovide connectivity between devices located in different geographicalareas and/or different types of local networks. For example, network 100may comprise local networks 160, 162 that include devices/nodes 10-16and devices/nodes 18-20, respectively, as well as a data center/cloudenvironment 150 that includes servers 152-154. Notably, local networks160-162 and data center/cloud environment 150 may be located indifferent geographic locations.

Servers 152-154 may include, in various embodiments, a networkmanagement server (NMS), a dynamic host configuration protocol (DHCP)server, a constrained application protocol (CoAP) server, an outagemanagement system (OMS), an application policy infrastructure controller(APIC), an application server, etc. As would be appreciated, network 100may include any number of local networks, data centers, cloudenvironments, devices/nodes, servers, etc.

The techniques herein may also be applied to other network topologiesand configurations. For example, the techniques herein may be applied topeering points with high-speed links, data centers, etc. Further, invarious embodiments, network 100 may include one or more mesh networks,such as an Internet of Things network. Loosely, the term “Internet ofThings” or “IoT” refers to uniquely identifiable objects/things andtheir virtual representations in a network-based architecture. Inparticular, the next frontier in the evolution of the Internet is theability to connect more than just computers and communications devices,but rather the ability to connect “objects” in general, such as lights,appliances, vehicles, heating, ventilating, and air-conditioning (HVAC),windows and window shades and blinds, doors, locks, etc. The “Internetof Things” thus generally refers to the interconnection of objects(e.g., smart objects), such as sensors and actuators, over a computernetwork (e.g., via IP), which may be the public Internet or a privatenetwork.

Notably, shared-media mesh networks, such as wireless networks, etc.,are often on what is referred to as Low-Power and Lossy Networks (LLNs),which are a class of network in which both the routers and theirinterconnect are constrained. In particular, LLN routers typicallyoperate with highly constrained resources, e.g., processing power,memory, and/or energy (battery), and their interconnections arecharacterized by, illustratively, high loss rates, low data rates,and/or instability. LLNs are comprised of anything from a few dozen tothousands or even millions of LLN routers, and support point-to-pointtraffic (e.g., between devices inside the LLN), point-to-multipointtraffic (e.g., from a central control point such at the root node to asubset of devices inside the LLN), and multipoint-to-point traffic(e.g., from devices inside the LLN towards a central control point).Often, an IoT network is implemented with an LLN-like architecture. Forexample, as shown, local network 160 may be an LLN in which CE-2operates as a root node for nodes/devices 10-16 in the local mesh, insome embodiments.

FIG. 2 is a schematic block diagram of an example node/device 200 thatmay be used with one or more embodiments described herein, e.g., as anyof the computing devices shown in FIGS. 1A-1B, particularly the PErouters 120, CE routers 110, nodes/device 10-20, servers 152-154 (e.g.,a network controller located in a data center, etc.), any othercomputing device that supports the operations of network 100 (e.g.,switches, etc.), or any of the other devices referenced below. Thedevice 200 may also be any other suitable type of device depending uponthe type of network architecture in place, such as IoT nodes, etc.Device 200 comprises one or more network interfaces 210, one or moreprocessors 220, and a memory 240 interconnected by a system bus 250, andis powered by a power supply 260.

The network interfaces 210 include the mechanical, electrical, andsignaling circuitry for communicating data over physical links coupledto the network 100. The network interfaces may be configured to transmitand/or receive data using a variety of different communicationprotocols. Notably, a physical network interface 210 may also be used toimplement one or more virtual network interfaces, such as for virtualprivate network (VPN) access, known to those skilled in the art.

The memory 240 comprises a plurality of storage locations that areaddressable by the processor(s) 220 and the network interfaces 210 forstoring software programs and data structures associated with theembodiments described herein. The processor 220 may comprise necessaryelements or logic adapted to execute the software programs andmanipulate the data structures 245. An operating system 242 (e.g., theInternetworking Operating System, or IOS®, of Cisco Systems, Inc.,another operating system, etc.), portions of which are typicallyresident in memory 240 and executed by the processor(s), functionallyorganizes the node by, inter alia, invoking network operations insupport of software processors and/or services executing on the device.These software processors and/or services may comprise a trafficanalysis process 248.

It will be apparent to those skilled in the art that other processor andmemory types, including various computer-readable media, may be used tostore and execute program instructions pertaining to the techniquesdescribed herein. Also, while the description illustrates variousprocesses, it is expressly contemplated that various processes may beembodied as modules configured to operate in accordance with thetechniques herein (e.g., according to the functionality of a similarprocess). Further, while processes may be shown and/or describedseparately, those skilled in the art will appreciate that processes maybe routines or modules within other processes.

In general, traffic analysis process 248 may execute one or more machinelearning-based classifiers to classify traffic in the network for anynumber of purposes. In one embodiment, traffic analysis process 248 mayassess captured telemetry data regarding one or more traffic flows, todetermine whether a given traffic flow or set of flows are caused bymalware in the network, such as a particular family of malwareapplications. Example forms of traffic that can be caused by malware mayinclude, but are not limited to, traffic flows reporting exfiltrateddata to a remote entity, spyware or ransomware-related flows, commandand control (C2) traffic that oversees the operation of the deployedmalware, traffic that is part of a network attack, such as a zero dayattack or denial of service (DoS) attack, combinations thereof, or thelike. In further embodiments, traffic analysis process 248 may classifythe gathered telemetry data to detect other anomalous behaviors (e.g.,malfunctioning devices, misconfigured devices, etc.), traffic patternchanges (e.g., a group of hosts begin sending significantly more or lesstraffic), or the like.

Traffic analysis process 248 may employ any number of machine learningtechniques, to classify the gathered traffic data. In general, machinelearning is concerned with the design and the development of techniquesthat receive empirical data as input (e.g., telemetry data regardingtraffic in the network) and recognize complex patterns in the inputdata. For example, some machine learning techniques use an underlyingmodel M, whose parameters are optimized for minimizing the cost functionassociated to M, given the input data. For instance, in the context ofclassification, the model M may be a straight line that separates thedata into two classes (e.g., labels) such that M=a*x+b*y+c and the costfunction is a function of the number of misclassified points. Thelearning process then operates by adjusting the parameters a,b,c suchthat the number of misclassified points is minimal. After thisoptimization/learning phase, traffic analysis 248 can use the model M toclassify new data points, such as information regarding new trafficflows in the network. Often, M is a statistical model, and the costfunction is inversely proportional to the likelihood of M, given theinput data.

In various embodiments, traffic analysis process 248 may employ one ormore supervised, unsupervised, or semi-supervised machine learningmodels. Generally, supervised learning entails the use of a training setof data, as noted above, that is used to train the model to apply labelsto the input data. For example, the training data may include sampletelemetry data that is “normal,” or “malware-generated.” On the otherend of the spectrum are unsupervised techniques that do not require atraining set of labels. Notably, while a supervised learning model maylook for previously seen attack patterns that have been labeled as such,an unsupervised model may instead look to whether there are suddenchanges in the behavior of the network traffic. Semi-supervised learningmodels take a middle ground approach that uses a greatly reduced set oflabeled training data.

Example machine learning techniques that traffic analysis process 248can employ may include, but are not limited to, nearest neighbor (NN)techniques (e.g., k-NN models, replicator NN models, etc.), statisticaltechniques (e.g., Bayesian networks, etc.), clustering techniques (e.g.,k-means, mean-shift, etc.), neural networks (e.g., reservoir networks,artificial neural networks, etc.), support vector machines (SVMs),logistic or other regression, Markov models or chains, principalcomponent analysis (PCA) (e.g., for linear models), multi-layerperceptron (MLP) ANNs (e.g., for non-linear models), replicatingreservoir networks (e.g., for non-linear models, typically for timeseries), random forest classification, or the like.

The performance of a machine learning model can be evaluated in a numberof ways based on the number of true positives, false positives, truenegatives, and/or false negatives of the model. For example, the falsepositives of the model may refer to the number of traffic flows that areincorrectly classified as malware-generated, anomalous, etc. Conversely,the false negatives of the model may refer to the number of trafficflows that the model incorrectly classifies as normal, when actuallymalware-generated, anomalous, etc. True negatives and positives mayrefer to the number of traffic flows that the model correctly classifiesas normal or malware-generated, etc., respectively. Related to thesemeasurements are the concepts of recall and precision. Generally, recallrefers to the ratio of true positives to the sum of true positives andfalse negatives, which quantifies the sensitivity of the model.Similarly, precision refers to the ratio of true positives the sum oftrue and false positives.

In some cases, traffic analysis process 248 may assess the capturedtelemetry data on a per-flow basis. In other embodiments, trafficanalysis 248 may assess telemetry data for a plurality of traffic flowsbased on any number of different conditions. For example, traffic flowsmay be grouped based on their sources, destinations, temporalcharacteristics (e.g., flows that occur around the same time, etc.),combinations thereof, or based on any other set of flow characteristics.

As shown in FIG. 3, various mechanisms can be leveraged to captureinformation about traffic in a network, such as telemetry data regardinga traffic flow. For example, consider the case in which client node 10initiates a traffic flow with remote server 154 that includes any numberof packets 302. Any number of networking devices along the path of theflow may analyze and assess packet 302, to capture telemetry dataregarding the traffic flow. For example, as shown, consider the case ofedge router CE-2 through which the traffic between node 10 and server154 flows.

In some embodiments, a networking device may analyze packet headers, tocapture feature information about the traffic flow. For example, routerCE-2 may capture the source address and/or port of host node 10, thedestination address and/or port of server 154, the protocol(s) used bypacket 302, or other header information by analyzing the header of apacket 302. Example captured features may include, but are not limitedto, Transport Layer Security (TLS) information (e.g., from a TLShandshake), such as the ciphersuite offered, user agent, TLS extensions,etc., Hypertext Transfer Protocol (HTTP) information (e.g., URI, etc.),Domain Name System (DNS) information, or any other data features thatcan be extracted from the observed traffic flow(s).

In further embodiments, the device may also assess the payload of thepacket to capture information about the traffic flow. For example,router CE-2 or another device may perform deep packet inspection (DPI)on one or more of packets 302, to assess the contents of the packet.Doing so may, for example, yield additional information that can be usedto determine the application associated with the traffic flow (e.g.,packets 302 were sent by a web browser of node 10, packets 302 were sentby a videoconferencing application, etc.).

The networking device that captures the flow telemetry data may alsocompute any number of statistics or metrics regarding the traffic flow.For example, CE-2 may determine the start time, end time, duration,packet size(s), the distribution of bytes within a flow, etc.,associated with the traffic flow by observing packets 302. In furtherexamples, the capturing device may capture sequence of packet lengthsand time (SPLT) data regarding the traffic flow, sequence of applicationlengths and time (SALT) data regarding the traffic flow, or bytedistribution (BD) data regarding the traffic flow.

As noted above, actively capturing and reporting all available datafeatures regarding the behavior of a device may be too cumbersome inmany deployments due to the resulting consumption of device and networkresources. However, this does not diminish the value of certain datafeatures from a behavioral analytics standpoint. For example, operatingsystem (OS) start events (e.g., boots, restarts, etc.) can be indicativeof a host being infected with malware, since some malware can forcerestarts and because a newly started device may indicate a new virtualmachine instance.

OS Start Event Detection, OS Fingerprinting, and Device Tracking UsingEnhanced Data Features

The techniques herein allow for the passive monitoring of a number ofdifferent host behavioral features without requiring explicit reportingof these features by the network hosts. In particular, the techniquesallow a behavioral analytics system to infer a number of features abouta host in the network based on an analysis of the traffic associatedwith the host. In various aspects, these features may includeindications of host OS start events, OS fingerprinting, device tracking,application identification, and other host features that can beidentified through traffic analysis using the techniques herein. Infurther aspects, these passively identified features can be used asinput to a malware detector or other behavioral analyzer, therebyallowing for greater detection of malware in the network and formitigation actions to be performed as needed.

Specifically, according to one or more embodiments of the disclosure asdescribed in detail below, a device in a network tracks changes in asource port or address identifier indicated by network trafficassociated with a particular host in the network. The device detects anoperating system start event based on the track changes in the sourceport or address identifier indicated in the traffic data associated withthe particular host. The device provides data regarding the detectedoperating system start event as input to a machine learning-basedmalware detector. The device causes performance of a mitigation actionin the network when the malware detector determines that the particularhost is infected with malware.

Illustratively, the techniques described herein may be performed byhardware, software, and/or firmware, such as in accordance with thetraffic analysis process 248, which may include computer executableinstructions executed by the processor 220 (or independent processor ofinterfaces 210) to perform functions relating to the techniquesdescribed herein.

Operationally, one aspect of the traffic analysis techniques herein ishost identification, which is performed to associate a particular hostwith each of the traffic flows that it sends and receives. While an IPsource address can sometimes be used to map a flow to a host, dynamic IPaddress assignment with DHCP and Network Address Translation (NAT) bothcomplicate this process. Notably, DHCP can change the host associatedwith an address, so that the host-to-address mapping is different beforeand after address reassignment. With NAT, multiple hosts can beassociated with a single source address, making host identificationimpossible unless network data other than the source address are used.The use of NAT is also widespread and NAT is used in many server loadbalancers to achieve scalable Internet services, in some serviceprovider networks (e.g., as Carrier-Grade NAT, or CGN), and in virtualmachines on both servers and laptops, as well as firewalls andconsumer-grade routers.

A related function of the techniques herein is OS start detection, thatis, the identification of OS (re)boots/(re)starts from the networktraffic, in various embodiments. Based on preliminary testing, OS startevents have been shown to be relevant from a network security standpointbecause they are sometimes triggered by infections, and they areassociated with some pseudorandom number generator vulnerabilities. Inaddition, OS start event detection helps to distinguish between rebootedmachines and mobile devices that have joined the network at a newlocation.

FIG. 4 illustrates an example of the tracking of host network traffic,according to various embodiments. As shown, assume that n-number oftraffic packets 402 are sent by, or are otherwise associated with, agiven host in the network. Such traffic may utilize any number ofdifferent protocols and may or may not employ encryption to protect thecontents of their payloads. Analysis of the header information ofpackets 402 allows for the identification of certain features of theassociated host device that can then be used in more complex machinelearning analysis of the behavior of the host.

In various embodiments, the different traffic features available frompackets 402 may be used to form sequences of these tracked features. Forexample, assume that packets 402 are sent in a sequence over timecomprising the set of n-number of packets {1, . . . , i, i+1, . . . n).Through the analysis of the headers of the individual packets 402, thetraffic analyzer can identify the corresponding sequences of the trafficfeatures over time. For example, one tracked traffic feature may be theTCP or UDP source ports indicated by the headers of packets 402, in oneembodiment. Thus, from the analysis of packets 402, the traffic analyzercan obtain a corresponding sequence of n-number of source ports used inpackets 402. Similarly, in another embodiment, a further such trafficfeature may be the IP identifiers (IDs) 406 indicated by the headers ofpackets 402. In this way, the traffic analyzer can track the sequencesof any number of fields or other data available from packets 402 overthe course of time.

Preliminary testing of the use of traffic features such as source portsand IP IDs by different operating systems has yielded the followinginsights. First, many operating systems exhibit a predictable patternwith respect to their use of source ports and IP IDs in their traffic.Second, the ranges of these values may also be OS-specific, allowing forthe identification/fingerprinting of the OS directly from its observednetwork traffic.

More specifically, it has been shown that port selection is performed bythe common operating systems listed below as follows:

-   -   MacOS: source ports for each TCP session are assigned        sequentially, starting at 49,000.    -   Linux: TCP ports are assigned in accordance with the Internet        Engineering Task Force (IETF) Request for Comments (RFC) 6056        document entitled “Recommendations for Transport-Protocol Port        Randomization,” by M. Larsen et al. Typically, this port usage        falls within the range of 32,000-61,000 using the following        approach:        -   offset=F(local_IP, remote_IP, remote_port, secret_key);        -   port=offset+next_ephemeral++;    -   Windows: follows the same strategy as Linux, except the        ephemeral range is 49,000-65,000.

The above information can be leveraged to passively infer a number ofhost features through the analysis of the network traffic associatedwith the host. Such features include, in various embodiments, OS startevents by the host, the actual OS executed by the host, applicationsexecuted by the host, and/or movements of the host from a networkingstandpoint.

FIGS. 5A-5B illustrate examples of the detection of operating systemstart events from tracked network traffic, in accordance with variousembodiments herein. A key insight into the use of the source port and IPID fields by different operating systems is that these values aretypically incremented with time until an OS start event occurs. Bydetecting non-sequential changes in the source ports or IP ID fields ofa host's traffic, the traffic analyzer can pinpoint when OS start eventshave occurred.

For example, as shown in FIG. 5A, assume that the sequence of sourceports observed from host packets 402 is of the form {1, . . . i} upuntil the occurrence of the start event. Rather than continuing thesequence (e.g., with source port i+1), however, a typical OS will jumpnon-sequentially back to the start of the sequence (e.g., by beginningagain with source port 1). In the case of MacOS, for example, it hasbeen observed that the source port will reset to 49,000 after theoccurrence of an OS start event.

In FIG. 5B, a similar resetting pattern has been observed in certain IPID fields after the occurrence of an OS start event. For example, if thesequence {1, . . . i} of IP IDs 406 has been observed for a given host,but then is followed by a resetting of the sequence back to the initialIP ID, this is a strong indicator that an OS start event has occurred.Notably, many devices have been shown to start their IP ID values at ‘0’and begin incrementing from there until a OS start event occurs.

Information about the sequential nature of the source port and IP IDfields can also be used to detect when a device from one networkattaches to another, according to some embodiments. This is particularlyuseful for purposes of host identification. In particular, traffic fromthe same host can be associated back to that host by finding a sequenceof source ports or IP IDs in traffic from one network that can be piecedtogether with a corresponding sequence from another network.

Information about the sequences of source ports and/or IP IDs used bydifferent operating systems can also be leveraged to perform OSfingerprinting or application identification. In some embodiments,header features of packets such as user agent strings (from HTTPtraffic) and TLS ClientHello fingerprints (from HTTPS traffic) canprovide a strong indication of the OS of the host and/or applicationexecuted by the host, whenever present in the headers of packets.However, useful features such as these do not appear in every protocol,or even in every session of HTTP (since the User-agent can be modifiedby applications and users) and HTTPS (due to session resumption). Incontrast, the TCP/UDP source port and IP ID fields do appear in everypacket, and they can provide an indication of the OS (and sometimes theapplication), though this indication is usually more coarse-grained thanthat provided by application data features, such as user agents andClientHello field values.

In various embodiments, the traffic analyzer may use both applicationindicators, such as user agent or ClientHello field entries, incombination with TCP/IP header data, such as source port or IP ID, toinfer the OS of the host. For example, when the application datafeatures are not available, the traffic analyzer may infer the OS fromthe TCP/IP data. However, when an application data features areavailable, the traffic analyzer may use those features in conjunctionwith the TCP/IP data to estimate the OS. In each case, the systemassigns each flow to a host. In turn, the host can be represented in alogical model using its source address, IP ID sequence, and OS, as wellas, optionally, a TCP timestamp, a TCP Initial Sequence Number (ISN)seed, and/or TCP source port seed. The seed values, as explained below,are short values that are typically initialized at boot time, which cansometimes be inferred from traffic.

Generally, the traffic analyzer can infer the OS of the host byassessing one or more source ports in the traffic associated with thehost. For example, as shown in FIG. 6A, the initial source port usedand/or the progression of source ports 404 in the sequence, can be anindicator of the host OS or application that sent the traffic.Similarly, as shown in FIG. 6B, the initial IP ID and/or the progressionof IP IDs 406 in the sequence, can be an indicator of the host OS orapplication that sent the traffic. Note that certain situations may alsorequire the assessment of the source port(s) and IP ID(s) in conjunctionwith one another, to determine the OS or application of the host.

For example, if two or more sessions from a host are observed that arebound to the same destination address and destination port, then thevariable ‘offset’ in the above equations will be identical if the hostOS is Linux, and the source ports will thus be close. In turn, ifanother session to a distinct destination address or port is observed,and it is not close, then the device is likely Linux. Conversely, if thesource ports are close even when destination addresses or ports aredifferent, then the device is likely MacOS.

It is common for a device to have repeated sessions with popularInternet sites, such as google.com or Facebook.com, which provide therepeated sessions with identical destination ports and addresses neededin the above logic. Many devices and applications also have particularservices that they routinely contact, e.g., to check for updates, whichalso provide sessions with repeated destinations.

Given the source port and IP ID values from a set of sessions, the mostlikely OS can be estimated by selecting the one that is most likely, asdetermined by a probabilistic model in which the ‘offset’ value israndom for distinct inputs of the function F. If many sessions areavailable, a sequential hypothesis test can be applied to each sessionsuccessively, until the likely OS is found.

Similar to the OS fingerprinting, application inference can takeadvantage of the fact that if a source port is outside the typical rangefor the given OS, then it has been set by the application and not theOS, and the value of the port is likely to be indicative of theexecuting application. Several applications have also been observed toexhibit this behavior. For example, McAfee executing on older versionsof Windows typically use a source port range of 5,000-15,000.

In various embodiments, using a probabilistic model and sequentialhypothesis testing based on traffic features such as the source ports,IP_ID, TCP headers, and available application data, has proven to givereasonably confident estimates of host features such as the OS of thehost, whether the host was recently booted, etc. In turn, these hostsfeatures can then be used as input to a machine learning-based trafficclassifier, such as a malware detector. For example, in the case ofmalware traffic classification, the operating system can be embeddeddirectly into the input feature vector and utilized fortraining/testing. This has a significant effect due to different malwarefamilies being targeted at specific operating systems.

Of further note is that a malware sample typically has a set ofbehaviors that it performs when the host device starts, e.g., ensuringpersistence, registering with the botmaster, etc. By detecting an OSstart event, the system can both collect benign training data that moreclosely matches the generative process of the malware samples, and teston subsets of data that more accurately match our training datadistribution. This method allows for the training of more accurateclassifiers, e.g., the malware classifier is not learning to detect OSstart events, but rather what a malicious OS start event looks like.

When such a malware detector detects malware based in part on ananalysis of any of the host features detected using the techniquesherein, any number of mitigation actions can be initiated in thenetwork. For example, such a mitigation action may comprise blocking thenetwork traffic associated with the particular host or capturing copiesof traffic packets associated with the particular host for furtherreview. In another example, the mitigation action may entail sending analert to an administrator or to another device, to take further actionwith respect to the host (e.g., contacting the user to schedulemaintenance, etc.).

wherein the mitigation action comprises at least one of: blocking thenetwork traffic associated with the particular host, generating an alertregarding the particular host, or capturing copies of packets of thenetwork traffic associated with the particular host.

FIG. 7 illustrates an example simplified procedure for detectingoperating system restarts in a network, in accordance with one or moreembodiments described herein. For example, a non-generic, specificallyconfigured device (e.g., device 200) may perform procedure 700 byexecuting stored instructions (e.g., process 248). The procedure 700 maystart at step 705, and continues to step 710, where, as described ingreater detail above, the device may track changes in a source port oraddress identifier indicated by network traffic associated with aparticular host in the network. For example, the device may assess thesource ports and/or IP IDs identified in the headers of packetsassociated with the host (e.g., traffic sent by the host, etc.).

At step 715, as detailed above, the device may detect an operatingsystem start event based on the track changes in the source port oraddress identifier indicated in the traffic data associated with theparticular host. Such a start event may be, for example, a completepowering up of the host (e.g., an initial boot or reboot) or, in thecase of a virtual machine executed by the host, starting of the virtualmachine. Notably, in many situations, the sequence of source portsand/or address identifiers used in the host's traffic may be incrementedover time until the occurrence of an OS start event. By tracking thesetraffic features and identifying non-sequential changes in the sourceport or IP IDs (e.g., re-initialization of the sequence), the device candiscern when an OS start event has occurred.

At step 720, the device may provide data regarding the detected OS startevent as input to a machine learning-based malware detector, asdescribed in greater detail above. For example, such a detector maycomprise a machine learning-based malware classifier that has beentrained using a labeled set of training data and is configured todiscern benign traffic from traffic associated with malware.

At step 725, as detailed above, the device may cause performance of amitigation action in the network when the malware detector determinesthat the particular host is infected with malware. Such a mitigationaction may entail blocking the network traffic associated with theparticular host, generating an alert regarding the particular host,capturing copies of packets of the network traffic associated with theparticular host, or any other mitigation action. Procedure 700 then endsat step 730.

It should be noted that while certain steps within procedure 700 may beoptional as described above, the steps shown in FIG. 7 are merelyexamples for illustration, and certain other steps may be included orexcluded as desired. Further, while a particular order of the steps isshown, this ordering is merely illustrative, and any suitablearrangement of the steps may be utilized without departing from thescope of the embodiments herein.

The techniques described herein, therefore, allow for the passiveidentification of certain host features (e.g., without requiringself-reporting by the host) through analysis of the network trafficassociated with the host. By observing TCP source ports and IP ID fieldsfrom multiple sessions, some of which are to the same destinationaddress and port, the system can estimate the OS generating thesessions, detect OS start events and, in some cases, make inferencesabout applications executed by the host. This information can be usedfor easily deployable visibility or to increase the efficacy ofnetwork-based malware classifiers.

While there have been shown and described illustrative embodiments thatprovide for the identification of certain host features through trafficanalysis, it is to be understood that various other adaptations andmodifications may be made within the spirit and scope of the embodimentsherein. For example, while certain embodiments are described herein withrespect to using certain models for purposes of malware detection, themodels are not limited as such and may be used for other functions, inother embodiments. In addition, while certain protocols are shown, suchas HTTP and HTTPS, other suitable protocols may be used, accordingly.

The foregoing description has been directed to specific embodiments. Itwill be apparent, however, that other variations and modifications maybe made to the described embodiments, with the attainment of some or allof their advantages. For instance, it is expressly contemplated that thecomponents and/or elements described herein can be implemented assoftware being stored on a tangible (non-transitory) computer-readablemedium (e.g., disks/CDs/RAM/EEPROM/etc.) having program instructionsexecuting on a computer, hardware, firmware, or a combination thereof.Accordingly, this description is to be taken only by way of example andnot to otherwise limit the scope of the embodiments herein. Therefore,it is the object of the appended claims to cover all such variations andmodifications as come within the true spirit and scope of theembodiments herein.

What is claimed is:
 1. A method comprising: tracking, by a device in a network, changes in a source port or address identifier indicated by encrypted network traffic associated with a particular host in the network; detecting, by the device, an operating system restart event based on the tracked changes in the source port or address identifier indicated in the traffic data associated with the particular host; providing, by the device, data regarding the operating system start event as input to a machine learning-based malware detector; and causing, by the device, performance of a mitigation action in the network when the malware detector determines that the particular host is infected with malware.
 2. The method as in claim 1, wherein the mitigation action comprises at least one of: blocking the encrypted network traffic associated with the particular host, generating an alert regarding the particular host, or capturing copies of packets of the encrypted network traffic associated with the particular host.
 3. The method as in claim 1, wherein the machine learning-based malware detector comprises a malware classifier.
 4. The method as in claim 1, wherein the address identifier is identified by the encrypted network traffic in an Internet Protocol (IP) identification (ID) field of IP headers of packets of the encrypted network traffic.
 5. The method as in claim 1, wherein detecting the operating system start event based on the track changes in the source port or address identifier indicated in the traffic data associated with the particular host comprises: detecting, by the device, a non-sequential change in the source port or address identifier indicated in the traffic data associated with the particular host.
 6. The method as in claim 1, further comprising: detecting, by the device, an application associated with the particular host in the network based on a determination that the source port indicated by the traffic associated with the host is outside of an expected range for a given operating system; and providing, by the device, data regarding the detected application as input to the machine learning-based malware detector.
 7. The method as in claim 1, further comprising: detecting, by the device, a movement of the host by associating a first sequence of address identifiers indicated by the encrypted network traffic associated with the host with a second sequence of address identifiers indicated by the encrypted network traffic associated with the host.
 8. The method as in claim 1, further comprising: identifying, by the device, a user agent string or ClientHello field entry from the traffic associated with the encrypted network traffic; and providing, by the device, data regarding the identified user agent or ClientHello field entry as input to the machine learning-based malware detector.
 9. An apparatus, comprising: one or more network interfaces to communicate with a network; a processor coupled to the network interfaces and configured to execute one or more processes; and a memory configured to store a process executable by the processor, the process when executed configured to: track changes in a source port or address identifier indicated by encrypted network traffic associated with a particular host in the network; detect an operating system of the particular host in the network based on the source port; detect an operating system restart event based on the track changes in the source port or address identifier indicated in the traffic data associated with the particular host; provide data regarding the operating system and the detected operating system start event as input to a machine learning-based malware detector; and cause performance of a mitigation action in the network when the malware detector determines that the particular host is infected with malware.
 10. The apparatus as in claim 9, wherein the machine learning-based malware detector comprises a malware classifier.
 11. The apparatus as in claim 9, wherein the address identifier is identified by the encrypted network traffic in an Internet Protocol (IP) identification (ID) field of IP headers of packets of the encrypted network traffic.
 12. The apparatus as in claim 9, wherein the apparatus detects the operating system start event based on the track changes in the source port or address identifier indicated in the traffic data associated with the particular host comprises: detecting, by the device, a non-sequential change in the source port or address identifier indicated in the traffic data associated with the particular host.
 13. The apparatus as in claim 9, wherein the process when executed is further configured to: detect an application associated with the particular host in the network based on a determination that the source port indicated by the traffic associated with the host is outside of an expected range for a given operating system; and providing, by the device, data regarding the detected application as input to the machine learning-based malware detector.
 14. The apparatus as in claim 9, wherein the process when executed is further configured to: detecting, by the device, a movement of the host by associating a first sequence of address identifiers indicated by the encrypted network traffic associated with the host with a second sequence of address identifiers indicated by the encrypted network traffic associated with the host.
 15. The apparatus as in claim 9, wherein the process when executed is further configured to: identify a user agent string or ClientHello field entry from the traffic associated with the encrypted network traffic; and provide data regarding the identified user agent or ClientHello field entry as input to the machine learning-based malware detector.
 16. A tangible, non-transitory, computer-readable medium storing program instructions that cause a device to execute a process comprising: tracking, by the device, changes in a source port or address identifier indicated by encrypted network traffic associated with a particular host in a network; detecting, by the device, an operating system of the particular host in the network based on the source port; detecting, by the device, an operating system restart event based on the track changes in the source port or address identifier indicated in the traffic data associated with the particular host; providing, by the device, data regarding the operating system and the detected operating system start event as input to a machine learning-based malware detector; and causing, by the device, performance of a mitigation action in the network when the malware detector determines that the particular host is infected with malware.
 17. The tangible, non-transitory, computer-readable medium as in claim 16, wherein the mitigation action comprises at least one of: blocking the encrypted network traffic associated with the particular host, generating an alert regarding the particular host, or capturing copies of packets of the encrypted network traffic associated with the particular host.
 18. The tangible, non-transitory, computer-readable medium as in claim 16, wherein the machine learning-based malware detector comprises a malware classifier.
 19. The tangible, non-transitory, computer-readable medium as in claim 16, wherein detecting the operating system start event based on the track changes in the source port or address identifier indicated in the traffic data associated with the particular host comprises: detecting, by the device, a non-sequential change in the source port or address identifier indicated in the traffic data associated with the particular host.
 20. The tangible, non-transitory, computer-readable medium as in claim 16, the program instructions that cause the device to execute the process further comprising: detecting, by the device, an application associated with the particular host in the network based on a determination that the source port indicated by the traffic associated with the host is outside of an expected range for a given operating system; and providing, by the device, data regarding the detected application as input to the machine learning-based malware detector. 